package com.luyuan.crm.member.service;

import java.util.List;

import org.hibernate.criterion.Order;

import com.luyuan.crm.member.model.Customer;
import com.luyuan.crm.member.model.Member;
import com.luyuan.crm.user.Party;
import com.ruijie.components.security.model.AppUser;
import com.ruijie.foundation.annotation.DomainService;
import com.ruijie.foundation.query.Page;
import com.ruijie.foundation.query.criteria.CriteriaTemplate;

@DomainService
public interface MemberService {

    Member getById(String id);

    Member getByName(String name);

    Member getByMobile(String mobile);

    Member getByAccount(AppUser appUser);

    Member createMember(Customer customer);

    void updateMember(Member member);

    void updateActiveTime(Member member);

    List<Member> findByParty(Party party);

    Page pagedQuery(CriteriaTemplate criteria, int page, int pageSize, List<Order> orders);

    Page pagedQueryOnline(CriteriaTemplate criteria, int page, int pageSize, List<Order> orders);

}
